home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!usenet
- From: GHouck <hksys@teleport.com>
- Newsgroups: comp.lang.c
- Subject: Re: String Function
- Date: 25 Mar 1996 20:04:54 GMT
- Organization: systems hk
- Message-ID: <4j6u96$3ef@nadine.teleport.com>
- References: <4j06mo$1nb@freenet-news.carleton.ca>
- NNTP-Posting-Host: ip-pdx04-34.teleport.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
-
- aq436@FreeNet.Carleton.CA (Jerry Boyd) wrote:
- >
- >
- >How would I write a function (in the form of
- >substring[source,start,count,result] ... yes, I need to
- >reinvent the wheel) to remove a specified number of
- >characters from a string and store it in an array. For
- >instance, extracting three characters from a string,
- >starting at from the 4th character.
- >
- Jerry,
-
- You might try:
-
- strncpy( result,(source+start),count );
-
- Yours, Geoff Houck
-
-